<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/reset.css">
    <style>
        .box {
            width: 200px;
            height: 200px;
            background-color: grey;
            margin: 50px;

        }
    </style>
</head>

<body>
    <div class="box"></div>
</body>
<script>

    // onmouseover和onmouseout相关的事件对象的属性.
    // fromElement   事件触发时,从哪个元素来
    // toElement     事件触发时,到哪个元素去


    var box = document.querySelector(".box");

    // box.onmouseover = function (e) {
    //     console.log("鼠标滑过");
    //     console.log("fromElement:", e.fromElement);
    //     console.log("toElement:", e.toElement);
    // }
    box.onmouseout = function (e) {
        console.log("鼠标滑除");
        console.log("fromElement:", e.fromElement);
        console.log("toElement:", e.toElement);
    }






</script>

</html>